package com.outsider.action;

import com.outsider.service.OutsiderService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.context.annotation.RequestScope;

import javax.annotation.Resource;

/**
 * Created by outsider on 2017/5/17.
 */
@Controller
@RequestMapping("outsider")
public class OutsiderAction {
    @Resource(name = "outsiderService")
    private OutsiderService outsiderService;

    @RequestMapping("/hello")
    public void sayHello(){
        System.out.println(outsiderService.tell());
    }

    @RequestMapping("/test")
    @ResponseBody
    public String test(){
        return outsiderService.tell();
    }
}
